﻿using HRX.PayCenter.Contract;
using System;
using System.Collections.Generic;
using System.Text;

namespace HRX.PayCenter.ApplicationCore.Exceptions
{
    /// <summary>
    /// 
    /// </summary>
    public class PayCenterException : Exception
    {
        /// <summary>
        /// 错误码
        /// </summary>
        public int Code { get; }
  
        /// <summary>
        /// 
        /// </summary>
        /// <param name="info"></param>
        /// <param name="context"></param>
        protected PayCenterException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context)
        {
            Code = (int)ResultCode.系统异常;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="code"></param>
        /// <param name="message"></param>
        public PayCenterException(int code, string message) : base(message)
        {
            Code = code;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="code"></param>
        /// <param name="message"></param>
        /// <param name="innerException"></param>
        public PayCenterException(int code, string message, Exception innerException) : base(message, innerException)
        {
            Code = code;
        }
    }
}